#pragma once
#include <vector>

#include <glm/glm.hpp>

#include "VertexArray.h"
#include "Shader.h"

namespace Cogs {
	enum  class RendererAPIType {
		None = 0,
		OpenGL,
		DirectX12,
		Vulkan
	};

	class RendererAPI{
	public:
		virtual void Initial() = 0;
		virtual void SetViewPort(int x, int y, int w, int h) = 0;
		virtual void ClearBuffer() = 0;
		virtual void DrawIndex(const std::shared_ptr<VertexArray>& vertexArray,uint32_t indexCount,
			const std::string& shaderName = "ColorShader") = 0;
		virtual void ClearColor(const glm::vec4& color) = 0;
		virtual void CreateUserShader(const std::string& name,
			const std::unordered_map<ShaderType, std::string>& shaderTypeAndSorce) = 0;
		virtual void LoadUserShader(const std::string& name,
			const std::unordered_map<ShaderType, std::string>& shaderTypeAndFilePath) = 0;
		virtual std::shared_ptr<Shader> GetUserShader(const std::string& shaderName) = 0;
	public:
		static RendererAPIType GetAPIType();
	protected:
		static RendererAPIType m_APIType;
		std::shared_ptr<ShaderLibrary> m_ShaderLibrary;
	};
}